﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Enring
{
    public class CustomerException:Exception
    {
        public string FriendlyDescription { get; set; }
        public string Description { get; set; }
        
        public CustomerException(string description)
        {
            SetDesciption(description);
        }

        private void SetDesciption(string description)
        {
            this.Description = description;
            this.FriendlyDescription = description;
        }

        public CustomerException(string description,string friendlyDescription)
        {
            this.Description = description;
            this.FriendlyDescription = friendlyDescription;
        }

        public CustomerException(string format, params object[] args)
        {
            SetDesciption(string.Format(format,args));
        }
    }
}
